<template>
  <div 
    @click="handleClick"
    class="flex flex-col items-center justify-center size-8 border px-8 py-1 
    cursor-pointer hover:bg-blue-500
    rounded-md bg-blue-700 text-white">
    <slot></slot>
  </div>
</template>
<style>
</style>
<script setup lang="ts">
/*
(250609) 15:32 如何响应外界的点击事件，浪费了很多时间
*/
import "~style.css"
const emits = defineEmits(["btnClick"])
function handleClick() {
  // 注意写法: `emits['btnClick']()` -> `emits('btnClick')`
  emits('btnClick');
}
</script>